package com.yphone.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ScrollView;

public class StretchScrollView extends ScrollView {
    private boolean isScrolledToBottom;
    private boolean isScrolledToTop = true;

    public StretchScrollView(Context context) {
        super(context);
    }

    public StretchScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public StretchScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    /* access modifiers changed from: protected */
    public void onScrollChanged(int l, int t, int oldl, int oldt) {
        super.onScrollChanged(l, t, oldl, oldt);
        if (getScrollY() == 0) {
            setScrolledToTop(true);
            setScrolledToBottom(false);
        } else if (((getScrollY() + getHeight()) - getPaddingTop()) - getPaddingBottom() == getChildAt(0).getHeight()) {
            setScrolledToTop(false);
            setScrolledToBottom(true);
        } else {
            setScrolledToTop(false);
            setScrolledToBottom(false);
        }
    }

    public boolean isScrolledToTop() {
        return this.isScrolledToTop;
    }

    public void setScrolledToTop(boolean scrolledToTop) {
        this.isScrolledToTop = scrolledToTop;
    }

    public boolean isScrolledToBottom() {
        return this.isScrolledToBottom;
    }

    public void setScrolledToBottom(boolean scrolledToBottom) {
        this.isScrolledToBottom = scrolledToBottom;
    }
}